/**
 * @name Find Function Callers
 * @kind problem
 * @problem.severity info
 * @id cpp/find-function-callers
 * @description 查找调用指定函数的所有位置
 */

import cpp

from Function f, FunctionCall call
where f.getName().matches("%${functionName}%") and
      call.getTarget() = f
select 
    call.getLocation().getStartLine() as line,
    call.getLocation().getStartColumn() as column,
    call.getFile().getRelativePath() as filePath,
    call.getEnclosingFunction().getName() as callerFunction,
    f.getName() as calledFunction

